#ifndef GPUFRAMEWORK_H
#define GPUFRAMEWORK_H

#define  GPUFRAMEWORK_API _declspec(dllimport)

#include <glew.h>
#include <glut.h>
#include <Cg/cgGL.h>

#pragma comment( lib,"glew32.lib" )
#pragma comment( lib,"cg.lib" )
#pragma comment( lib,"cgGL.lib" )

typedef struct
{
	GLenum target;
	GLenum internalFormat;
	GLenum format;
}texInfo;

GPUFRAMEWORK_API GLuint glInitial(int* argc, char **argv);
GPUFRAMEWORK_API void createFBO(GLuint* fb);
GPUFRAMEWORK_API void configureCullingSpace(int width,int height);
GPUFRAMEWORK_API void createTexture(GLuint* tID,int width,int height,texInfo* tex);
GPUFRAMEWORK_API void sendTexture(int width,int height,texInfo* tex,float* data);
GPUFRAMEWORK_API void cgInitial(CGcontext* cgContext,CGprofile* fragmentProfile,CGprogram* fragmentProgram,char* sourceFile);
GPUFRAMEWORK_API void cgParamInitial(CGparameter* data,char* paramName,CGprogram* fragmentProgram);
GPUFRAMEWORK_API void bufferInitial(GLuint* tID,texInfo* tex,CGprofile* fragmentProfile,CGprogram* fragmentProgram);
GPUFRAMEWORK_API void cgTexParamConfigure(GLuint* tID,CGparameter* data);
GPUFRAMEWORK_API void triggerGPUComputation(int width,int height);
GPUFRAMEWORK_API void readBuffer(int width,int height,texInfo* tex,float*data);
GPUFRAMEWORK_API void cgRelease(CGcontext* cgContext,CGprogram* fragmentProgram);
GPUFRAMEWORK_API void FBORelease(GLuint* fb);
GPUFRAMEWORK_API void textureRelease(GLuint* tID);
GPUFRAMEWORK_API void glRelease(GLuint* window);


#endif
